﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MediaClient.Shelf;
using MediaClient.ImportMedia;
using MediaClient.Management;
using MediaClient.Publish;

namespace MediaClient
{
    public partial class IndexForm : BaseMainForm
    {
        public IndexForm()
        {
            InitializeComponent();
        }

        private void lblNavigation_Click(object sender, EventArgs e)
        {
            Label lblControl = sender as Label;
            if (lblControl != null)
            {
                BaseForm oForm = null;
                switch (lblControl.Name)
                {
                    case "lblImport":
                        oForm = new ImportForm();
                        break;
                    case "lblShelf":
                        oForm = new ShelfForm();
                        break;
                    case "lblPublish":
                        oForm = new PrintForm();
                        break;
                    case "lblSysManagement":
                        oForm = new SystemSettingForm();
                        break;
                    case "lblGoBack":
                        oForm = new VideoOutputForm();
                        break;
                    case "lblCheckWaterMarker":
                        oForm = new CheckWaterMarkerForm();
                        break;
                }
                if (oForm != null)
                {
                    if (oForm.GetType() != typeof(SystemSettingForm) && oForm.GetType() != typeof(CheckWaterMarkerForm))
                    {
                        oForm.Show();
                        this.Hide();
                    }
                    else
                        oForm.ShowDialog();
                }
            }
        }

        private void lblNavigation_MouseMove(object sender, MouseEventArgs e)
        {
            Label lblControl = sender as Label;
            if (lblControl != null)
            {
                switch (lblControl.Name)
                {
                    case "lblImport":
                        lblImport.Image = global::MediaClient.Properties.Resources.导航_录制_1;
                        break;
                    case "lblShelf":
                        lblShelf.Image = global::MediaClient.Properties.Resources.导航_离线管理_1;
                        break;
                    case "lblPublish":
                        lblPublish.Image = global::MediaClient.Properties.Resources.导航_发行_1;
                        break;
                    case "lblCheckWaterMarker":
                        lblCheckWaterMarker.Image = global::MediaClient.Properties.Resources.导航_水印检测_1;
                        break;
                    case "lblGoBack":
                        lblGoBack.Image = global::MediaClient.Properties.Resources.导航_回放_1;
                        break;
                    case "lblSysManagement":
                        lblSysManagement.Image = global::MediaClient.Properties.Resources.导航_系统管理_1;
                        break;
                }
            }
        }

        private void lblNavigation_MouseLeave(object sender, EventArgs e)
        {
            Label lblControl = sender as Label;
            if (lblControl != null)
            {
                switch (lblControl.Name)
                {
                    case "lblImport":
                        lblImport.Image = global::MediaClient.Properties.Resources.导航_录制;
                        break;
                    case "lblShelf":
                        lblShelf.Image = global::MediaClient.Properties.Resources.导航_离线管理;
                        
                        break;
                    case "lblPublish":
                        lblPublish.Image = global::MediaClient.Properties.Resources.导航_发行;
                        break;

                    case "lblGoBack":
                        lblGoBack.Image = global::MediaClient.Properties.Resources.导航_回放;
                        break;
                    case "lblSysManagement":
                        lblSysManagement.Image = global::MediaClient.Properties.Resources.导航_系统管理;
                        break;
                    case "lblCheckWaterMarker":
                        lblCheckWaterMarker.Image = global::MediaClient.Properties.Resources.导航_水印检测;
                        break;
                }
            }
        }

        
    }
}
